package design_pattern.ActiveObjects;

/**
 * @Author: 蔡翔
 * @Date: 2019/11/27 15:18
 * @Version 1.0
 */
public class DisplayStringRequest extends MethodRequest {

    private final String text;

    public DisplayStringRequest(Servant servant,final String text) {
        super(servant, null);
        this.text = text;
    }

    @Override
    public void execute() {
        this.servant.displayString(text);
    }
}
